package org.moore.controller;

import org.moore.view.WelcomePanel;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.Random;

// 随机验证码类
public class RandomNumListener implements MouseListener {

    public RandomNumListener() {
    }
    // 点击按钮后刷新验证码
    @Override
    public void mouseClicked(MouseEvent e) {
        Random random = new Random();
        WelcomePanel.getLoginJLabel().getCheckNum().setText(String.valueOf(random.nextInt(10000)));
    }

    @Override
    public void mousePressed(MouseEvent e) {

    }

    @Override
    public void mouseReleased(MouseEvent e) {

    }

    @Override
    public void mouseEntered(MouseEvent e) {

    }

    @Override
    public void mouseExited(MouseEvent e) {

    }
}
